package com.hua.method;
//方法的重载，两个方法名字相同，但是传递的参数不同，计算的结果就不同

public class Demo03 {
    public static void main(String[] args) {
        double sum = add(10.2,23,2);
        System.out.println(sum);
        double sum1 = add(1.2,2.1);
        System.out.println(sum1);
        int sum2 = add(2,3);
        System.out.println(sum2);
    }
    public static int add(int a , int b){
        return a+b;
    }
    public static double add(double a ,double b){
        return a+b;
    }

    public static double add(double a ,double b,double c){
        return a+b+c;
    }

}
